<template>
  <div class="wrapper">
    这是弹框组件
    <el-button @click="handleConfirm" type="primary">确定</el-button>
    <el-button @click="handleCancel">取消</el-button>
  </div>
</template>
<script setup>
const emit = defineEmits(['confirm', 'cancel'])

const handleConfirm = () => {
  emit('confirm', '这是传递给父组件的数据')
}
const handleCancel = () => {
  emit('cancel', '这是传递给父组件的数据')
}
</script>